<?php
//var_dump();
class  MoneyDistribution extends BaseModel
{
	public $res;
	public $key;
	public function getSource()
		    {
				return "commission_config";
    }
	public function initialize()
	{
		 parent::initialize();
	} 

//获取用户等级的金额
	public function get_user_money($level){
		$key='level'.$level."_self";
		$res=$this->findFirstByKey($key);
		$data['self_money']=$res->val;
		$data['next_money']=$this->findFirstByKey("level4_self")->val;
		$data['self_money_plus']=$this->findFirstByKey("val_plus")->val;
		return $data;
	
	}
}
